package principal.view.gui;

import javax.swing.JFrame;
import principal.model.vos.Usuarios;

public class LoginManager extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2978611426520091534L;
	private Usuarios user;
	static int privilegios;
	static String username;	

	public LoginManager(){
		Usuarios user = new Usuarios();
		setUser(user);
	}
	
	public Usuarios getUser() {
		return user;
	}

	public void setUser(Usuarios user) {
		this.user = user;
		setTitle(this.user.getName()+" usuario del sistema");
	}
	
	static int getPrivilegios(){
		
		return  privilegios;
	}
	
	public static void setPrivilegios(int privi){
		privilegios=privi;
		
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		LoginManager view = new LoginManager();
		Usuarios user = view.getUser();
		UserAuthenticationDialog userAuthenticationDialog = new UserAuthenticationDialog(view, true);
		
		//user = userAuthenticationDialog.getAuthenticatedUser();
	
	}

	public static String getUsername() {
		return username;
	}

	public static void setUsername(String username) {
		LoginManager.username = username;
	}

}
